package com.android.canvasproject.model.entity;

import com.android.canvasproject.enums.TaskListStatusEnum;

public class TaskList extends GenericEntity {

	private static final long serialVersionUID = -248027880082838458L;

	private Integer id;

	private String description;

	private TaskListStatusEnum status;

	private Integer postit;

	private Integer sponsor;

	public static class TaskListDao {
		public static final String TB_TASKLIST = "TASKLIST";

		public static final String[] COLS_TASKLIST = new String[] { "_id",
				"description", "status", "id_postit", "id_person_sponsor",
				"id_ics", "creation_date", "last_sync", "last_notification",
				"local_creation", "is_synchronized" };
		
		public static final String DB_CREATE_TASKLIST = "CREATE TABLE IF NOT EXISTS TASKLIST (_id INTEGER PRIMARY KEY, description VARCHAR(80) NOT NULL, status INT DEFAULT 0, id_postit BITINT NOT NULL, id_person_sponsor INTEGER NOT NULL, id_ics BIGINT UNIQUE, creation_date DATETIME DEFAULT CURRENT_TIMESTAMP, last_sync TIMESTAMP NULL, last_notification TIMESTAMP NULL, local_creation INT DEFAULT 0, is_synchronized INT DEFAULT 0, CONSTRAINT fk_tasklist_postit FOREIGN KEY (id_postit) REFERENCES POSTIT (_id), CONSTRAINT fk_tasklist_person FOREIGN KEY (id_person_sponsor) REFERENCES PERSON (_id));";
	}

	public TaskList() {
		super();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public TaskListStatusEnum getStatus() {
		return status;
	}

	public void setStatus(TaskListStatusEnum status) {
		this.status = status;
	}

	public Integer getPostit() {
		return postit;
	}

	public void setPostit(Integer postit) {
		this.postit = postit;
	}

	public Integer getSponsor() {
		return sponsor;
	}

	public void setSponsor(Integer sponsor) {
		this.sponsor = sponsor;
	}
}